﻿using System.Web;
using MonkeyShop.Web.Models;

namespace MonkeyShop.Web.WebCommon
{
    public class CatalogCommon
    {
        private static readonly object Locker = new object();
        public static DesktopModel SavedDesktopModel
        {
            get
            {
                var desktopModel = (DesktopModel)HttpContext.Current.Session["SavedDesktopModel"];
                return desktopModel;
            }
            set
            {
                lock (Locker)
                {
                    HttpContext.Current.Session["SavedDesktopModel"] = value;
                }
            }
        }
    }
}